<template>
  <div class="tenant-container">
    <!-- <ContentWrap>
      <el-form
        ref="queryFormRef"
        class="-mb-15px"
        :model="queryParams"
        :inline="true"
        label-width="68px"
      >
        <el-form-item label="会员ID" prop="userId">
          <el-input v-model="queryParams.userId" placeholder="请输入会员ID" class="!w-240px" />
        </el-form-item>
        <el-form-item label="手机号" prop="mobile">
          <el-input v-model="queryParams.mobile" placeholder="请输入手机号" class="!w-240px" />
        </el-form-item>
        <el-form-item label="时间" prop="createTime">
          <el-date-picker
            v-model="queryParams.createTime"
            value-format="YYYY-MM-DD HH:mm:ss"
            type="datetimerange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
            class="!w-240px"
            :shortcuts="shortcuts"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="handleQuery">查询</el-button>
          <el-button @click="handleReset">重置</el-button>
        </el-form-item>
      </el-form>
    </ContentWrap> -->
    <ContentWrap>
      <el-table :data="tableData" :stripe="true" :show-overflow-tooltip="true" :loading="loading">
        <el-table-column label="门店名称" prop="storeName" align="center" />
        <el-table-column label="舌诊数据(报告)" prop="tongueCount" align="center" />
      </el-table>
      <Pagination
        :total="total"
        v-model:page="queryParams.pageNo"
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
      />
    </ContentWrap>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, toRefs } from 'vue'
import { dateFormatter } from '@/utils/formatTime'
import { TongueRecordApi } from '@/api/application/tongue/record'
const tongueReportData = ref({})
const message = useMessage()
import dayjs from 'dayjs'
const state = reactive({
  queryParams: {
    pageNo: 1,
    pageSize: 10
  },
  loading: false,
  tableData: [],
  total: 0
})
const { queryParams, loading, tableData, total } = toRefs(state)
const queryFormRef = ref() // 搜索的表单

/** 查询列表 */
const getList = async () => {
  loading.value = true
  try {
    const data = await TongueRecordApi.getReportPageStoreDrainage(queryParams.value)
    console.log('data',data)
    tableData.value = data.list
    total.value = data.total
  } finally {
    loading.value = false
  }
}
onMounted(() => {
  getList()
})
const handleRecord = (row?: any) => {
  console.log(row)
}
</script>

<style scoped lang="scss"></style>
